Ext.define('Intranet.LienKet.view.MiniView', {
    extend: 'Ext.panel.Panel',
    alias: 'widget.LienKet_MiniView',
    title: 'Lien ket',
    height: 200,
    width: '100%',
    tools: [{
            type: 'minimize',
            tooltip: 'Minimize',
            handler: function(event, toolEl, owner, tool) {
                owner.up('panel').collapse();
            }
        }, {
            type: 'restore',
            tooltip: 'Restore',
            handler: function(event, toolEl, owner, tool) {
                owner.up('panel').expand();
            }
        }, {
            type: 'maximize',
            tooltip: 'Maximize',
            handler: function(event, toolEl, owner, tool) {
                Ext.create('Ext.window.Window', {
                    title: 'Lien ket',
                    height: 500,
                    width: 800,
                    layout: 'fit',
                    items: {
                        xtype: 'LienKet_MainView'
                    }
                }).show();
            }
        }],
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    items: [{
            xtype: 'container',
            flex: 4,
            margin: '2 5 2 5',
            style: {
                borderWidth: 2,
                borderStyle: 'solid',
                borderColor: '#BDD3EF',
                borderTop: 'none',
                borderLeft: 'none',
                borderRight: 'none',
                
            },
            
            items: []
    
        }, {
            xtype: 'container',
            flex: 2,
            margin: '0 5 2 5',
            items: []
    
        }, {
            xtype: 'container',
            height: 25,
            layout: {
                type: 'hbox'
            },
            style: {
                borderWidth: 1,
                borderStyle: 'solid',
                borderColor: '#BDD3EF',
                borderBottom: 'none',
                borderLeft: 'none',
                borderRight: 'none',
                
            },
            
            items: [{
                xtype: 'button',
                width: 60,
                text: 'Gioi thieu',
                
            }]
        }],
    listeners: {
//        afterrender: function(thisCmp, opts) {
//
//            var panels = thisCmp.query('panel');
//
//            for (var i = 0; i < panels.length; i++)
//            {
//                if (panels[i].getHeader()) {
//                    panels[i].getHeader().getEl().applyStyles({
//                        backgroundImage: "none",
//                        backgroundColor: "#fff"
//                    });
//                }
//            }
//        }

    }

});
